package com.github.CharlesSong.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * Description:
 * Author: CharlesSong
 * Date  : 2015/10/12
 */
@Controller
public class HelloWorldController {



    @RequestMapping("/hello")
    @ResponseBody
    public Map<String,String> hello(){
        Map<String,String> result= new HashMap<String, String>();
        result.put("hello","spring mvc");
        return result;
    }

    @RequestMapping("/")
    public String hellomvc(){
        return "hellomvc";
    }

}
